package com.baibei.sdk;

import com.baibei.ebec.sdk.IUserApi;
import com.github.raee.runit.AndroidRUnit4ClassRunner;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

/**
 * token 测试
 * Created by ChenRui on 2017/8/3 0003 10:54.
 */
@RunWith(AndroidRUnit4ClassRunner.class)
public class UserApiTest extends SdkTest {

    private IUserApi mUserApi;

    @Override
    @Before
    public void setup() {
        super.setup();
        mUserApi = getApiProvider().getUserApi();
    }

    @Test
    public void testLogin() throws Exception {
//        getApiProvider().clear();
        runTest(mUserApi.signIn("18588440756", "123456"));
    }

    @Test
    public void testResetPassword() throws Exception {
        runTest(mUserApi.resetLoginPassword("15918716307", "123123", "123d"));
    }

    @Test
    public void testPersonalReg() throws Exception {
        runTest(mUserApi.register("15918716307", "123123", "123dd", "123d"));
    }

    @Test
    public void testEnterpriseReg() throws Exception {
        runTest(mUserApi.enterpriseRegister("15918716307", "123123", "123dd", "陈睿", "10086", "http://img.url.com"));
    }
}
